<?php if (! defined ( 'BASEPATH' )) exit ( 'No direct script access allowed' );

class U_customer_passenger extends MY_Model {
	
    function __construct() {
    	$table_name = strtolower(get_called_class()); // you can refer to $table_name as specific name
    	$table_fields_info = array(); // you can add table fields into this array()
    	
        parent::__construct($table_name, $table_fields_info);
    }
    
    function get_customer_passenger_by_name_like($customer_id, $like_name, $passenger_type) {
    	$s_passenger_type = strtoupper($passenger_type[0]);
    	
    	$sql_str = 
    	"SELECT * FROM `u_customer_passenger`
		WHERE
		u_customer_passenger.user_id = {$customer_id}
		AND u_customer_passenger.passenger_name LIKE '{$like_name}%'
		AND u_customer_passenger.passenger_type = '{$s_passenger_type}'
		";
    	
    	return $this->db->query($sql_str)->result_array();
    }
}

/* This file was generated by class: Tool, function: generate_model */
/* End of file u_customer_passenger.php */
/* Location: ./application/models/u_customer_passenger.php */
